package com.dianping.cat.home.server.entity;

import com.dianping.cat.home.server.BaseEntity;
import com.dianping.cat.home.server.IVisitor;
import java.util.LinkedHashMap;
import java.util.Map;

public class ServerMetricConfig
  extends BaseEntity<ServerMetricConfig> {
/* 10 */   private Map<String, Group> m_groups = new LinkedHashMap();






/* 17 */   public void accept(IVisitor visitor) { visitor.visitServerMetricConfig(this); }


  public ServerMetricConfig addGroup(Group group) {
/* 21 */     this.m_groups.put(group.getId(), group);
/* 22 */     return this;
  }


  public boolean equals(Object obj) {
/* 27 */     if (obj instanceof ServerMetricConfig) {
/* 28 */       ServerMetricConfig _o = (ServerMetricConfig)obj;

/* 30 */       if (!equals(getGroups(), _o.getGroups())) {
/* 31 */         return false;
      }


/* 35 */       return true;
    }

/* 38 */     return false;
  }


/* 42 */   public Group findGroup(String id) { return (Group)this.m_groups.get(id); }


  public Group findOrCreateGroup(String id) {
/* 46 */     Group group = (Group)this.m_groups.get(id);

/* 48 */     if (group == null) {
/* 49 */       synchronized (this.m_groups) {
/* 50 */         group = (Group)this.m_groups.get(id);

/* 52 */         if (group == null) {
/* 53 */           group = new Group(id);
/* 54 */           this.m_groups.put(id, group);
        }
      }
    }

/* 59 */     return group;
  }


/* 63 */   public Map<String, Group> getGroups() { return this.m_groups; }



  public int hashCode() {
/* 68 */     int hash = 0;

/* 70 */     return hash * 31 + ((this.m_groups == null) ? 0 : this.m_groups.hashCode());
  }




  public void mergeAttributes(ServerMetricConfig other) {}



/* 80 */   public Group removeGroup(String id) { return (Group)this.m_groups.remove(id); }
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/classes/!/com/dianping/cat/home/server/entity/ServerMetricConfig.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */